//
//  DadaAnotherTableViewCell.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "DadaAnotherTableViewCell.h"

@implementation DadaAnotherTableViewCell


#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 图
        self.tu = [[UIImageView alloc]init];
        
        // title
        self.title = [[UILabel alloc]init];
        _title.numberOfLines = 0;
        
        // 内容
        self.neirong = [[UILabel alloc]init];
        _neirong.numberOfLines = 0;
        _neirong.font = [UIFont systemFontOfSize:12];
        
        // 评论
        self.pin = [[UILabel alloc]init];
        _pin.font = [UIFont systemFontOfSize:12];
        _pin.textAlignment = NSTextAlignmentRight;
        
        [self.contentView addSubview:_tu];
        [self.contentView addSubview:_title];
        [self.contentView addSubview:_neirong];
        [self.contentView addSubview:_pin];
        
        [_tu NightWithType:UIViewColorTypeNormal];
        [_neirong NightWithType:UIViewColorTypeNormal];
        [_pin NightWithType:UIViewColorTypeNormal];
        [_title NightWithType:UIViewColorTypeNormal];
        
    }
    return self;
}

#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _tu.frame = CGRectMake(5 * KWITH, 5 * KHIGHT, 90 * KWITH, 70 * KHIGHT);
    _title.frame = CGRectMake(100 * KWITH, 5 * KHIGHT, self.contentView.frame.size.width - 110, 30 * KHIGHT);
    _neirong.frame = CGRectMake(100 * KWITH, 40 * KHIGHT, self.contentView.frame.size.width - 110, 30 *KHIGHT);
    _pin.frame = CGRectMake(280 * KWITH, 60 * KHIGHT, 80 * KWITH, 20 * KHIGHT);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
